import java.util.Random;

/**
 * 加减法口算练习系统-v0.1
 * 生成50道100以内加法/减法算式的习题
 */
public class CalculationSystemV01 {
    public static void main(String[] args) {
        Random random = new Random();
        int totalQuestions = 50;
        
        System.out.println("加减法口算练习系统-v0.1");
        System.out.println("========================");
        
        for (int i = 1; i <= totalQuestions; i++) {
            // 生成100以内的随机数
            int num1 = random.nextInt(100) + 1; // 1-100
            int num2 = random.nextInt(100) + 1; // 1-100
            
            // 随机决定加法或减法
            boolean isAddition = random.nextBoolean();
            String operator = isAddition ? "+" : "-";
            
            // 构建算式字符串
            String expression = num1 + " " + operator + " " + num2 + " = ";
            
            // 输出算式
            System.out.println("第" + i + "题: " + expression);
        }
    }
}